#ifndef STX_ALGORITHM_GENERATE_HPP
#define STX_ALGORITHM_GENERATE_HPP

#include <stx/algorithm/common.hpp>

namespace stx {

template <class ForwardIterator, class Generator>
inline void
generate(ForwardIterator first, ForwardIterator last, Generator gen)
{
    for (; first != last; ++first) {
        *first = gen();
    }
}

} // namespace stx

#endif // STX_ALGORITHM_GENERATE_HPP
